﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SAI
{
    public abstract class Node
    {
        protected string _id;
        protected List<Node> _outNeighbors;
        //protected List<Node> _inNeighbors;
        protected bool _visited;
        protected Node _parent;
        protected int level = int.MaxValue;
        // TODO: check if needed and add prop and addTo function
        //protected List<Edge> _outN;
        //protected List<Edge> _inN;

        public string ID { get { return _id; } }
        public List<Node> OutNeighbors { get { return _outNeighbors; } }
        //public List<Node> InNeighbors { get { return _inNeighbors; } }
        public bool Visited { get { return _visited; } }
        public Node Parent { get { return _parent; } set { _parent = value; } }

        public Node(string id)
        {
            _id = id;
          //  _inNeighbors = new List<Node>();
            _outNeighbors = new List<Node>();
            _visited = false;
            _parent = null;
        }
        public void addOutEdge(Node e)
        {
            _outNeighbors.Add(e);
        }

        internal void visited()
        {
            _visited = true;
        }
        public abstract void printNode();
        
        public abstract List<Node> getOutNeighbors();

        public int Level
        {
            get { return level; }
            set { level = value; }
        }
    }
}
